
<script type="text/javascript" charset="utf-8">

	var lb_name;
	$(function() {
		lb_name = $('#awsloadbalancer_id').combobox({
				disabled:true,
				valueField:'id',
				textField:'lb_name',
				editable:false
			});
		{{if awsloadbalancer_id != 0:}}
			$("#isdistribute").attr('checked','true');
			lb_name.combobox({
							disabled:false,
							url:'/awspost/monitorlbinfo',
							valueField:'id',
							textField:'lb_name',
							editable:false,
							panelHeight:'auto',
							required:true,
							value : {{=awsloadbalancer_id}}
						});
		{{pass}}
		
		$("#isdistribute").click(function(){
			if($("#isdistribute").attr('checked')==undefined){
					lb_name.combobox({
							disabled:true,
							valueField:'id',
							textField:'lb_name',
							editable:false,
							required:false,
						});
				}else{
					lb_name.combobox({
							disabled:false,
							url:'/awspost/monitorlbinfo',
							valueField:'id',
							textField:'lb_name',
							editable:false,
							panelHeight:'auto',
							required:true,
							value : {{=awsloadbalancer_id}}
						});
					}
		});
			

	});
</script>

<div style="padding: 5px;">
	<form method="post">
    <input type="hidden" name="id" />
		<table class="tableForm">
            <tr>
				<th style="width: 80px;">同步模块名</th>
				<td><input name="rsync_module" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写rsync同步模块名'" style="width: 200px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">服务端web目录</th>
				<td><input name="svn_webdir_server" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写服务端web目录'" style="width: 400px;" />
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">客户端web目录</th>
				<td><input name="svn_webdir_client" class="easyui-validatebox" data-options="required:'true',missingMessage:'请填写客户端web目录'" style="width: 400px;" />
				</td>
			</tr>
             <tr>
                  <th style="width:80px;">仓库名称</th>
                  <td>
                  <input style="line-height:26px;border:1px solid #ccc;width:200px" class="easyui-combobox" 
                        name="svn_id"
                        data-options="
                        url:'/projectpost/svninfo',
                        valueField:'id',
                        textField:'svn_id',
                        editable:false,
                        required:true,
                        panelHeight:'auto',
                        value : {{=svn_id}}
                    " />
                  </td>
			</tr>
            <tr>
                  <th style="width:80px;">关联分发</th>
                  <td>
                  <input type="checkbox" name='isdistribute' id='isdistribute' style="line-height:26px;border:1px solid #ccc;width:200px" />
                  </td>
			</tr>   
            <tr>
                  <th style="width:80px;">集群分发关联</th>
                  <td>
                  <input style="line-height:26px;border:1px solid #ccc;width:200px" class="easyui-combobox" 
                        name="awsloadbalancer_id" id="awsloadbalancer_id"/>
                  </td>
			</tr>
		</table>
	</form>
</div>